﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Audit_Configuration_Oracle.Model;
using Audit_Configuration_Oracle.DAL;

namespace Audit_Configuration_Oracle.Controllers
{
    public class LogInController
    {
        public static bool Connect(string user, string pass, string db, out string msg)
        {
            bool res = false;            
            try
            {
                if (LogInDAL.Connect(user, pass, db))
                {
                    msg = "Logged in succesfully";
                    res = true;
                }
                else
                {
                    msg = "Please verify your username or password";
                }
            }
            catch (Exception e)
            {
                throw e;
            }

            return res;
        }
    }
}
